import tkinter

win = tkinter.Tk()
win.title('This is My TK procedure')
win.geometry('800x600')


def get_text():
    print(entry2.get())

label1 = tkinter.Label(master=win,text='请输入用户名：')
entry2 = tkinter.Entry(master=win,text='{}')
button3 = tkinter.Button(master=win,text='获取entry内容',command = get_text)

label1.pack()
entry2.pack()
button3.pack()

win.mainloop()